<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml"
      xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
   <div id="vm">
       <!--当按下鼠标右键时，会触发show函数-->
       <input type="button" value="按钮" @click.right="show">
   </div>
</body>
<script>
    //可以使用v-on:f1=""
    Vue.config.keyCodes.f1 = 112;
    var vue = new Vue({
        el:"#vm",
        data:{
            text:""
        },
        methods:{
            show:function () {
                //获取文本框中的值
                console.log("ok");
            }
        }
    });
</script>
</html>

